<template>
    <div class="app">
        <tabbar
            ref="reflectName"
            class="tabbar"
            :eeui="{ tabType: 'bottom', tabHeight: 100,tabSlideSwitch:false,textSelectColor:'#2edb7d' }"
            :tabPages="tabPages"
            @pageSelected="pageSelected">
        </tabbar>
    </div>
</template>
<script>
    export default {
        data(){
            return{
                backPageVal:app.config.params,
                position: 0,
                tabPages: [
                    {
                        tabName: 'home',
                        title: '主页',
                        url: 'homePages/home.js',
                        selectedIcon:'tb-home-fill-light'
                    },
                    {
                        tabName: 'runpage',
                        title: '运动',
                        url: 'runPages/schoolRun.js',
                        selectedIcon:'../assets/images/tabbaricon02.png',
                        unSelectedIcon:'../assets/images/tabbaricon01.png'
                    },
                    {
                        tabName: 'user',
                        title: '我的',
                        url: 'myPages/userInfoPage.js',
                        selectedIcon:'md-person',
                        dot:false
                    }
                ]
            }
        },
        methods: {
            pageSelected(data) {
                this.position = data.position;
                //eeui.toast(data.position)
            },
        },
        created () {
            
        },
        mounted () {
            //eeui.toast(this.backPageVal)
            if(this.backPageVal.tabnum){
                this.$refs.reflectName.setCurrentItem(this.backPageVal.tabnum)
            }
        }

    }
</script>
<style scoped>
.tabbar {
        flex: 1;
        width: 750px;
    }
</style>